<{include file="header.html"}>
<!--[if IE]><script language="javascript" type="text/javascript" src="themes/js/flot/excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="themes/js/flot/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="themes/js/flot/jquery.flot.min.js"></script>
<script language="javascript" type="text/javascript" src="themes/js/flot/jquery.flot.pie.min.js"></script>
<div id="container">
	<div id ="c_title">
		<h2>欢迎您回来</h2>
		<span>最近访问时间</span>
		<div class = "clear"></div>
	</div>
	<div id ="pie">		
		<div class="title">
			<span>站点监控状态统计&nbsp;&nbsp;<{$fault}>&nbsp;/&nbsp;<{$normal}></span>
			<A href="#">所有监控项目</A>
			<div class ="clear"></div>
		</div>		
		<div id ="aaaccc">loading</div>
	</div>
	
	<div id="site">
	<table width="900" border="0" align="center">
			<tr>
					<td width="200">名称：</td>
					<td width="200">网址：</td>
					<td width="200">状态：</td>
					<td width="200">详情：</td>
			</tr>
	</table>
	<{foreach item=vo from=$list key=enname}>
	<table width="900" border="0" align="center">			
			<tr>
					<td width="200" ><{$vo.title}></td>
					<td width="200" ><{$vo.domain}></td>	
					<td width="200"><{if $vo.status_code == "200"}>正常<{else}>故障<{/if}></td>								
					<td width="200"><a href= "<{spUrl c=main a=record siteid=$vo.siteid title=$vo.title domain=$vo.domain}>">详情</a></td>
			</tr>				
	</table>
 	<{/foreach}>	
	</div>	
</div>

<div id="sidebar">
	<div class = "box">
		<div class ="title">
			<span>尊敬的客户欢迎您！</span>
		</div>
	</div>
	<div class = "box">
		<div class ="title">
			<span>栏目二</span>
		</div>
	</div>
</div>
<div class ="clear"></div>

<script type="text/javascript">
$(function () {
var data = [
	{ label: "故障",  data: 90},
	{ label: "正常",  data: 60}
	//	{ label: "故障",  data: <{$fault}>, color: 12},
//	{ label: "正常",  data: <{$normal}>, color: 3},
	
//	{ label: "提醒",  data: 80, color: 5},
];
$.plot($("#aaaccc"), data, 
		{
		        series: {
		            pie: { 
		                show: true,
		                radius: 1,
		                tilt: 0.5,
		                label: {
		                    show: true,
		                    radius: 1,
		                    formatter: function(label, series){
		                        return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;">'+label+'<br/>'+Math.round(series.percent)+'%</div>';
		                    },
		                    background: { opacity: 0.8 }
		                },
		                combine: {
		                    color: '#999',
		                    threshold: 0.1
		                }
		            }
		        },
		        legend: {
		            show: false
		        }
		});
});
</script>
<{include file="footer.html"}>